home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / dev / www_talk.930 / 000037_W.vanLeeuwen@nikhef.nl_(Willem van Leeuwen):.msg < prev    next >
Text File  |  1994-01-24  |  1KB  |  51 lines

  1.  
  2. I installed the server on our recently installed network sun (nic.nikhef.nl).
  3. With a very crude change in HTRetrieve it is possible to activate
  4. a script in case of a keyword search:
  5.  
  6. /*        Handle a Retrieve request from a WWW client    HTRetrieve.c
  7. ...
  8. extern int HTWriteASCII(int soc, char * s);    /* In HTDaemon.c */
  9.  
  10.     char *command;
  11.     char string[80];
  12.     char *ip;
  13.  
  14. /*        Read a file
  15. ...
  16.     if (keywords) {
  17. /*
  18.     if (TRACE) fprintf(logfile,"HTHandle: can't perform search %s\n",
  19.         arg);
  20.     HTWriteASCII(soc,
  21.         "Sorry, this server does not perform searches.\n");
  22. */
  23.     ip = string;
  24.     command = "/user/a03/bin/WWWsh ";
  25.     for (;*command!='\0';) *ip++ = *command++;
  26.     for (;*arg!='\0';) *ip++ = *arg++;
  27.     *ip++ = '?';
  28.     for (;*keywords!='\0';) *ip++ = *keywords++;
  29.     system (string);
  30.     return fd;
  31.     }
  32.     
  33.  
  34.     StrAllocCopy(arg2, arg);
  35. ...
  36.  
  37. With the following script the finger information is sent to the client:
  38.  
  39.     name=`echo $@ | awk -F? '{print $2}`
  40.     echo '<plaintext>'
  41.     /usr/ucb/finger $name@nikhefh
  42.  
  43. This script only serves to demonstrate that this solution works.
  44.  
  45. Our default file is //nic.nikhef.nl./user/a03/www/default/default.html
  46. but we are still experimenting so it is too early to hook nikhef into WWW.
  47. I'll let you know when we have more useful information.
  48.  
  49. Best regards,
  50. Willem van Leeuwen
  51.